FROM python:3.7
COPY . /app
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
WORKDIR ./app
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
EXPOSE 80
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]


# 使用说明，在项目目录下执行下面命令部署
# 1. 运行 docker build -t uniapp_shop .
# 2. docker run -d --name uniapp_shop_serve -p 8002:80 uniapp_shop